educational

Scripting Treasures Volume 1

Santa brought me a new laptop for Christmas, and while I'm in the process of transferring files from my old box to my new, I've begun uncovering lots of treasures. To start off the New Year, here's a selection from my collection of digital "Post-It" Notes. Enjoy:

Play An Audio Clip OnMouseOver
Ever wish you could have some hot chick purring "Cum In" when a surfer hovered over your "Enter" link (or any of a hundred other cool uses)? Here's the code:

<A href="#" onMouseOver="document.all.music.src='sound.wav'">TEXT or IMAGE</A>
<BGSOUND src="#" id=music loop=1 autostart="true">

Status Bar Masking OnMouseOver
Here's a trick that many newbies want to know how to do, even though most uses of it will be considered "blind linking" and may cause problems with sponsors and link lists, etc. Just add this code within your linking code:

onmouseout="self.status='';return true"
onmouseover="self.status='DESIRED TEXT';return true"

Launch Multiple OnClick Events
Sometimes you wish to fire multiple JavaScripts using a single event handler. One example is using a button to launch a new window while simultaneously changing (or NOT changing) the launching page. There are lots of cool applications for this, and here's a handy snippet of the underlying code to help you along your way. Put this first part in your <HEAD>:

<SCRIPT language="Javascript">
function MultiFuncs() {

onclick="window.open('https://new-window-url.com', '_blank',
'toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes')"

onclick="window.open('https://base-window-url.com', '_self')"

}

// MULTI LOAD -->
</SCRIPT>

Then add this part to the button, text, or image link you wish to use:

OnClick="MultiFuncs()"

Hotlinking Protection With .htaccess
To prevent content theft on Apache Webservers with mod_rewrite, make a secure content directory then put all your images and other content you wish to protect into that directory, ensuring that all of your image URLs point to this location. Then make an ".htaccess" file for this directory that contains:

AuthUserFile /dev/null
AuthGroupFile /dev/null

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^https://www.yourdomain.com/subdomain/ [NC]
RewriteCond %{HTTP_REFERER} !^https://yourdomain.com/subdomain/ [NC]
RewriteRule /* https://www.yourdomain.com/subdomain/ [R,L]

Change the domain name values to match your site, then upload this file in ASCII mode into the directory you wish to protect. Calls for content in that directory that come from OUTSIDE the URLs specified above will be redirected to the URL specified.

My Favorite Script Sources
Here's a bookmark collection that shows locations for finding just about any script you wish to have, and quite a few you probably didn't know existed, but may want to have later :)

Well there you have it: a few choice JavaScripts to spice up your pages, a quick bit of code to protect those pages, and a directory of all things scripting. Here's to a "dynamic" New Year!

Copyright © 2025 Adnet Media. All Rights Reserved. XBIZ is a trademark of Adnet Media.
Reproduction in whole or in part in any form or medium without express written permission is prohibited.

More Articles

opinion

WIA Profile: Lainie Speiser

With her fiery red hair and a laugh that practically hugs you, Lainie Speiser is impossible to miss. Having repped some of adult’s biggest stars during her 30-plus years in the business, the veteran publicist is also a treasure trove of tales dating back to the days when print was king and social media not even a glimmer in the industry’s eye.

Women in Adult ·
opinion

Fighting Back Against AI-Fueled Fake Takedown Notices

The digital landscape is increasingly being shaped by artificial intelligence, and while AI offers immense potential, it’s also being weaponized. One disturbing trend that directly impacts adult businesses is AI-powered “DMCA takedown services” generating a flood of fraudulent Digital Millennium Copyright Act (DMCA) notices.

Corey D. Silverstein ·
opinion

Building Seamless Checkout Flows for High-Risk Merchants

For high-risk merchants such as adult businesses, crypto payments are no longer just a backup plan — they’re fast becoming a first choice. More and more businesses are embracing Bitcoin and other digital currencies for consumer transactions.

Jonathan Corona ·
opinion

What the New SCOTUS Ruling Means for AV Laws and Free Speech

On June 27, 2025, the United States Supreme Court handed down its landmark decision in Free Speech Coalition v. Paxton, upholding Texas’ age verification law in the face of a constitutional challenge and setting a new precedent that bolsters similar laws around the country.

Lawrence G. Walters ·
opinion

What You Need to Know Before Relocating Your Adult Business Abroad

Over the last several months, a noticeable trend has emerged: several of our U.S.-based merchants have decided to “pick up shop” and relocate to European countries. On the surface, this sounds idyllic. I imagine some of my favorite clients sipping coffee or wine at sidewalk cafés, embracing a slower pace of life.

Cathy Beardsley ·
profile

WIA Profile: Salima

When Salima first entered the adult space in her mid-20s, becoming a power player wasn’t even on her radar. She was simply looking to learn. Over the years, however, her instinct for strategy, trust in her teams and commitment to creator-first innovation led her from the trade show floor to the executive suite.

Women in Adult ·
opinion

How the Interstate Obscenity Definition Act Could Impact Adult Businesses

Congress is considering a bill that would change the well-settled definition of obscenity and create extensive new risks for the adult industry. The Interstate Obscenity Definition Act, introduced by Sen. Mike Lee, makes a mockery of the First Amendment and should be roundly rejected.

Lawrence G. Walters ·
opinion

What US Sites Need to Know About UK's Online Safety Act

In a high-risk space like the adult industry, overlooking or ignoring ever-changing rules and regulations can cost you dearly. In the United Kingdom, significant change has now arrived in the form of the Online Safety Act — and failure to comply with its requirements could cost merchants millions of dollars in fines.

Cathy Beardsley ·
opinion

Understanding the MATCH List and How to Avoid Getting Blacklisted

Business is booming, sales are steady and your customer base is growing. Everything seems to be running smoothly — until suddenly, Stripe pulls the plug. With one cold, automated email, your payment processing is shut down. No warning, no explanation.

Jonathan Corona ·
profile

WIA Profile: Leah Koons

If you’ve been to an industry event lately, odds are you’ve heard Leah Koons even before you’ve seen her. As Fansly’s director of marketing, Koons helps steer one of the fastest-growing creator platforms on the web.

Women in Adult ·
Show More